package com.huanuo.internetofthings.service.resources;

import com.huanuo.internetofthings.bo.userResources.UserResources;
import com.huanuo.internetofthings.dao.userResources.UserResourcesMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.unicorn.framework.base.base.AbstractService;
import org.unicorn.framework.core.SysCode;
import org.unicorn.framework.core.exception.PendingException;

@Service
public class UserResourcesService extends AbstractService {

	@Autowired
	private UserResourcesMapper userResourcesMapper;

	public List<UserResources> getUserResourceList(UserResources userResources) throws PendingException {
		try {
			return this.userResourcesMapper.selectList(userResources);
		} catch (Exception e) {
			error("查询用户资源列表失败", e);
			throw new PendingException(SysCode.DB_ERROR, "查询用户资源列表失败");
		}
		
	}
}